package com.bibrApp.difu.actvity.jiedai_manager_mvp;

import androidx.annotation.NonNull;

import com.bibrApp.difu.R;
import com.bibrApp.difu.utils.Tools;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.ArrayList;

public class JiedaiManagerAdapter extends BaseQuickAdapter<JiedaiManagerBean, BaseViewHolder> {
    public JiedaiManagerAdapter() {
        super(R.layout.item_jiedaimanager, new ArrayList<>());
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, JiedaiManagerBean item) {

        helper.setText(R.id.item_orderid, "订单号  " + item.getTallaId());
        helper.setText(R.id.item_time, "创建时间  " + Tools.getTime(item.getCreateTime()));
        helper.setText(R.id.item_yrate, (item.getLegalDailyRate() * 365 * 100) + "%");
        helper.setText(R.id.item_money, item.getLegalQuantity());
        helper.setText(R.id.item_type, item.getPawnCoinEunit());
        helper.setText(R.id.item_lx, item.getPawnQuantity());
        helper.setText(R.id.item_dy, item.getPawnRate() + "%");
        helper.setText(R.id.item_cycle, item.getCycle());
        helper.setText(R.id.item_hk, Tools.getStatusText(item.getStatus()) + "  》");
        helper.setText(R.id.item_drate, (item.getLegalDailyRate() * 100) + "%");
        helper.addOnClickListener(R.id.item_hk);
    }
}
